package com.attendance.www.hr.dao.mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.attendance.www.hr.beans.AttendanceBean;

public interface AttendanceExtMapper {

    List<AttendanceBean> getAttendanceList(@Param("attendanceBean")AttendanceBean attendanceBean,@Param("employeeList")List<Integer> employeeList,@Param("startNum")Integer startNum,@Param("pageCount")Integer pageCount,@Param("type")Boolean type);
   
    Integer getAttendanceListPageTotal(@Param("attendanceBean")AttendanceBean attendanceBean,@Param("employeeList")List<Integer> employeeList);
    
    Integer getAbsenteeismByEmployee(@Param("attendanceBean")AttendanceBean attendanceBean);

    List<Map<String,Object>> getAttendanceDate(@Param("attendanceBean")AttendanceBean attendanceBean);
    
    Map<String,Object> getLeaveMap(@Param("attendanceBean")AttendanceBean attendanceBean);

    List<AttendanceBean> getAttendanceDateNotList(@Param("attendanceDate")Date attendanceDate,@Param("employeeIdList")List<Integer> employeeIdList);
    
    List<Integer> getEmployeeByCorporation(@Param("attendanceBean")AttendanceBean attendanceBean,@Param("employeeId")Integer employeeId);
    
    /**
     * 根据员工查询所属岗位ID
     * @param attendanceBean
     * @param employeeId
     * @return
     */
    List<Integer> getRolrByEmployeeId(@Param("attendanceBean")AttendanceBean attendanceBean,@Param("employeeId")Integer employeeId);
    
    
    AttendanceBean shouldAttendNumber(@Param("attendanceBean")AttendanceBean attendanceBean);
    
    /**
     * 根据岗位ID查询所属员工ID
     * @param attendanceBean
     * @param roleId
     * @return
     */
    List<Integer> getEmployeeIdListByRoleId(@Param("attendanceBean")AttendanceBean attendanceBean,@Param("employeeId")Integer employeeId,@Param("roleListId")List<Integer> roleListId);
    
    List<Integer> countByRetroactiveNum(@Param("attendanceBean")AttendanceBean attendanceBean);
    //查询应出勤时长
    Integer getShouldTime(@Param("attendanceBean")AttendanceBean attendanceBean);
    //查询实际出勤时长
    BigDecimal getActualTime(@Param("attendanceBean")AttendanceBean attendanceBean);
    //查询加班时长
    Integer getOvertime(@Param("attendanceBean")AttendanceBean attendanceBean);
    
    /**
     * 查询生成考勤日期不在入职日期范围内
     * @return
     */
    List<Integer> getAttendanceIdList();
    
    /**
     * 查询离职员工后，生成的考勤数据
     * @return
     */
    List<Integer> getAttendanceIdListByEmployeeIsSeparated();
}